// 数据生成器相关类型定义

export interface FieldConfig {
  name: string
  type: string
  options?: Record<string, any>
}

export interface DataGeneratorConfig {
  topic: string
  fields: FieldConfig[]
  count: number
  interval: number // 毫秒
  batch_size: number
  stream_mode: boolean
}

export interface GeneratorTask {
  task_id: string
  topic: string
  total_count: number
  sent_count: number
  status: 'starting' | 'running' | 'completed' | 'failed' | 'stopped'
  start_time: string
  end_time?: string
  error_message?: string
}

export interface FieldType {
  type: string
  description: string
  options: Record<string, string>
}

export interface FieldTypesResponse {
  field_types: FieldType[]
}

export interface StartTaskResponse {
  task_id: string
  message: string
  topic: string
  count: string
}
